home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / LW32.ZIP / TAP11.ZIP / tapserve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.7 KB  |  102 lines

  1. #ifndef _TAPSERVER
  2. #define _TAPSERVER
  3. //
  4. // TAPSERVER.H
  5. //
  6. // TAP
  7. // File Transfer Data Sharing
  8. // Server Code
  9. // Revision 1.00
  10. //
  11. // 12/28/94
  12. //
  13. #define TAP_SERVER_VERSION     "LiveWire/WPS 1.0a"   // Max 30 chars
  14. #include "tap.h"
  15.  
  16. typedef struct _TAPINFO
  17. {
  18.     ULONG  ulFlags;
  19.     UCHAR  szFileName[CCHMAXPATH];  // Fully qualified file name
  20.     LONG   lCurrentFileSize;        // Partial current size of the file
  21.     LONG   lCompleteFileSize;       // Size the file will be when complete (-1 if unknown)
  22. } TAPINFO, *PTAPINFO;
  23.  
  24. typedef struct _TAPSERVERINFO
  25. {
  26.     ULONG cb;                 // Number of bytes in this structure
  27.  
  28.     HMTX hServerMutex;   // Semaphore for controlling access to server
  29.  
  30.     HFILE *phWritePipe;  // Array of pipe write handles currently opened
  31.     LONG  lNumPipes;       // Number of pipes currently opened
  32.  
  33.     TID tidTAPServer;    // Thread ID of the TAP Server
  34.     HEV hevUpdate;       // Semaphore is released when an update is needed
  35.     LONG lShutdown;      // True if the server should shut down
  36.     LONG lFileOpen;        // True if a file is currently open (BOF => lFileOpen = TRUE, EOF => lFileOpen = FALSE)
  37.  
  38.     UCHAR szVersion[32];
  39.  
  40.     TAPINFO tiTapInfo;   // Data to be passed over the pipe
  41. } TAPSERVERINFO, *PTAPSERVERINFO;
  42.  
  43. typedef struct _LAUNCHINFO
  44. {
  45.    ULONG cb;            // Number of bytes in this structure
  46.  
  47.    PTAPSERVERINFO pTapServerInfo;
  48.    UCHAR szProgram[CCHMAXPATH];
  49.    UCHAR szParams[CCHMAXPATH];
  50.    UCHAR szTitle[CCHMAXPATH];
  51. } LAUNCHINFO, *PLAUNCHINFO;
  52.  
  53. //
  54. // For information on the functions prototyped below
  55. // see TAPSERVER.C
  56. //
  57. int SelectApplication_TAP(PTAPSERVERINFO pTapServerInfo,
  58.                                   HWND hWndParent,
  59.                                   HWND hWndOwner,
  60.                                   HMODULE hmod);
  61.  
  62. int GetApplications_TAP(char *pszApplications,
  63.                                     PULONG pulSize);
  64.  
  65. int GetApplicationInfo_TAP(char *szAppName,
  66.                                     PTAPAPPENTRY pTapAppInfo);
  67.  
  68. PTAPSERVERINFO InitializeServer_TAP(char szVersion[]);
  69.  
  70. int DeInitializeServer_TAP(PTAPSERVERINFO pTapServerInfo);
  71.  
  72. int StartApplication_TAP(PTAPSERVERINFO pTapServerInfo,
  73.                                     char *szAppPath,
  74.                                     char *szAppParams,
  75.                                     char *szAppTitle);
  76.  
  77. int SetFileName_TAP(PTAPSERVERINFO pTapServerInfo,
  78.                             char *szFileName);
  79.  
  80. int SetCompleteSize_TAP(PTAPSERVERINFO pTapServerInfo,
  81.                                 long lCompleteFileSize);
  82.  
  83. int SetCurrentSize_TAP(PTAPSERVERINFO pTapServerInfo,
  84.                                 long lCurrentFileSize);
  85.  
  86. int EmergencyClose_TAP(PTAPSERVERINFO pTapServerInfo);
  87.  
  88. int Cancel_TAP(PTAPSERVERINFO pTapServerInfo);
  89.  
  90. int EndOfFile_TAP(PTAPSERVERINFO pTapServerInfo);
  91.  
  92. int EndOfBatch_TAP(PTAPSERVERINFO pTapServerInfo);
  93.  
  94. void ServerThread_TAP(void *ServerInfo);
  95.  
  96. void LaunchApplicationThread_TAP(void *data);
  97.  
  98. FNWP SelectApplicationDlgProc;
  99.  
  100. #endif
  101.  
  102.